﻿using System;
using System.Collections.Generic;
using System.Text;
using FPA = Microsoft.ParallelArrays.FloatParallelArray;

namespace CoreCalc.SheetDefinedFunctions.Accellerator
{
    class UnknownAccNode : AccExpr
    {
        public static float[] values;
        public static FullCellAddr[] inputCells;

        private readonly FunCall funCall;
        private readonly FullCellAddr thisFca;
        private readonly SdfInfo sdfInfo;

        public UnknownAccNode(FunCall funCall, FullCellAddr fca, SdfInfo sdfInfo)
        {
            this.funCall = funCall;
            this.thisFca = fca;
            this.sdfInfo = sdfInfo;
        }

        protected override FPA GenerateFPA(AccInputInfo info, int CallID)
        {
            throw new NotImplementedException("Unknown exception: " + funCall.function.name);
            /*UnknownAccNode.inputCells = sdfInfo.inputCells;

            float[,] cValues = new float[1, values.GetLength(1)];
            for (int i = 0; i < values.GetLength(1); i++)
            {
                float[] rowValues = new float[values.GetLength(0)];
                for(int j = 0;j < rowValues.Length;j++)
                    rowValues[j] = values[j, i];
                UnknownAccNode.values = rowValues;

                cValues[0, i] = (float)((NumberValue)funCall.Eval(thisFca.sheet, thisFca.ca.col, thisFca.ca.col)).value;
            }

            UnknownAccNode.values = null;
            UnknownAccNode.inputCells = null;

            return new FPA(cValues);*/
        }
    }
}
